Displaying 4 results from an estimated 4 matches for "pqgetisnull".
2005 Sep 12
1
compile error with postgres and voicemail
...after setting the
postgres variable on 1 (that's what I have to do or not?), asterisk
terminates with the following compile error after make:
[...]
app_voicemail.c:460: warning: assignment makes pointer from integer without
a cast
app_voicemail.c:461: warning: implicit declaration of function `PQgetisnull'
app_voicemail.c:462: warning: implicit declaration of function `PQgetvalue'
app_voicemail.c:462: warning: passing arg 2 of `__builtin_strncpy' makes
pointer from integer without a cast
app_voicemail.c:464: warning: passing arg 2 of `__builtin_strncpy' makes
pointer from integer wit...
2004 Jun 23
0
UPDATE Patch for postgres enabled app_voicemail.c
...;
! //fprintf(stdout,"postgres sql_append_user: query found %d rows with %d
fields\n",PQntuples(PGSQLres), numFields);
! for (k = 0; k< (PQntuples(PGSQLres)); k++) {
! for (i=0; i<numFields; i++) {
! fname = PQfname(PGSQLres,i);
! if (!strcmp(fname, "password") && !PQgetisnull (PGSQLres,k,i)) {
! memset (password, 0, sizeof (password));
! strcpy (password,PQgetvalue(PGSQLres,k,i));
! } else if (!strcmp(fname, "context")) {
! memset (context, 0, sizeof (context));
! strcpy (context,PQgetvalue(PGSQLres,k,i));
! } else if (!strcmp(fname, "mailbox")) {
!...
2004 Jun 23
0
Patch for postgres enabled app_voicemail.c
...;
! //fprintf(stdout,"postgres sql_append_user: query found %d rows with %d
fields\n",PQntuples(PGSQLres), numFields);
! for (k = 0; k< (PQntuples(PGSQLres)); k++) {
! for (i=0; i<numFields; i++) {
! fname = PQfname(PGSQLres,i);
! if (!strcmp(fname, "password") && !PQgetisnull (PGSQLres,k,i)) {
! memset (password, 0, sizeof (password));
! strcpy (password,PQgetvalue(PGSQLres,k,i));
! } else if (!strcmp(fname, "context")) {
! memset (context, 0, sizeof (context));
! strcpy (context,PQgetvalue(PGSQLres,k,i));
! } else if (!strcmp(fname, "mailbox")) {
!...
2010 Apr 14
4
PostgreSQL driver supporting [round-robin] load balancing and redundancy [LONG]
...+
+static char const *multi_pgsql_result_get_field_value(struct sql_result *r,
+ unsigned i)
+{
+ struct multi_pgsql_result *result;
+ char const *value;
+ unsigned row;
+
+ result = (void *)r;
+ row = result->row;
+ value = PQgetvalue(result->pgr, row, i);
+ if (!*value && PQgetisnull(result->pgr, row, i)) value = NULL;
+
+ dprintf(("%s: %p: %u,%u: '%s'",
+ __func__, result, row, i, value ? value : "NULL"));
+ return value;
+}
+
+static unsigned char const *
+multi_pgsql_result_get_field_value_binary(struct sql_result *r,
+ unsigned i, size...