[PATCH] (sqlbox-standalone) gw/sqlbox_pgsql.h

2006-11-23 Thread Humberto Figuera

Hi,
 There is a minor patch for gw/sqlbox_pgsql.h ;p

I hope the list can appreciate it and it to be committed to CVS ;p

Bye.

--
Humberto Figuera - Using Linux 2.6.17
Usuario GNU/Linux 369709
Caracas - Venezuela
GPG Key Fingerprint = 5AAC DF0C 00F4 2834 28BA  37AD 3364 01D1 74CA 0603
Index: gw/sqlbox_pgsql.h
===
--- gw/sqlbox_pgsql.h	(revisiĆ³n: 2)
+++ gw/sqlbox_pgsql.h	(copia de trabajo)
@@ -1,6 +1,6 @@
 #include gwlib/gwlib.h
 #ifdef HAVE_PGSQL
-#include msg.h
+#include gw/msg.h
 #include sqlbox_sql.h
 #define sql_fetch_msg pgsql_fetch_msg
 #define sql_save_msg pgsql_save_msg


Re: [PATCH] Fix aliases in smsbox

2006-10-07 Thread Humberto Figuera

Hi,

this patch works fine ;p

Thanks Vincent!!!

vote 1++ for cvs.

--
Humberto Figuera - Using Linux 2.6.17
Usuario GNU/Linux 369709
Caracas - Venezuela
GPG Key Fingerprint = 5AAC DF0C 00F4 2834 28BA  37AD 3364 01D1 74CA 0603



Re: [SQLBOX] Stand Alone Module

2006-07-08 Thread Humberto Figuera

Hi Martin,

please add this patch to sqlbox-standalone/gw/sqlbox_pgsql.h ;p

bye

--
Humberto Figuera - Using Linux 2.6.17
Usuario GNU/Linux 369709
Caracas - Venezuela
GPG Key Fingerprint = 5AAC DF0C 00F4 2834 28BA  37AD 3364 01D1 74CA 0603
--- sqlbox_pgsql.h	2006-06-28 18:06:07.0 -0400
+++ ../../Desktop/sqlbox-standalone/gw/sqlbox_pgsql.h	2006-07-08 12:02:41.0 -0400
@@ -1,6 +1,6 @@
 #include gwlib/gwlib.h
 #ifdef HAVE_PGSQL
-#include msg.h
+#include gw/msg.h
 #include sqlbox_sql.h
 #define sql_fetch_msg pgsql_fetch_msg
 #define sql_save_msg pgsql_save_msg


Re: Some remarks

2006-07-06 Thread Humberto Figuera

On 7/6/06, Vincent CHAVANIS [EMAIL PROTECTED] wrote:


in php when double quotes are used, PHP will first look inside the string for 
any references to variables that may exist.  (=lower).


It is variable interpolation ;p


If you are using static string please use ' single quote (=faster in term of 
processing). PHP simply takes the string as-is and assigns it to the designated 
variable.

regards

Vincent


--
Humberto Figuera - Using Linux 2.6.17
Usuario GNU/Linux 369709
Caracas - Venezuela
GPG Key Fingerprint = 5AAC DF0C 00F4 2834 28BA  37AD 3364 01D1 74CA 0603



[PATCH] (sqlbox) gw/sqlbox_pgsql.c

2006-06-20 Thread Humberto Figuera

Hi,
I hope the list can appreciate it and it to be committed to CVS ;p

--
Humberto Figuera - Using Linux 2.6.16
Usuario GNU/Linux 369709
Caracas - Venezuela
GPG Key Fingerprint = 5AAC DF0C 00F4 2834 28BA  37AD 3364 01D1 74CA 0603
--- ../sqlbox/gw/sqlbox_pgsql.c	2006-06-20 12:05:47.0 -0400
+++ gw/sqlbox_pgsql.c	2006-06-20 13:35:38.0 -0400
@@ -155,10 +155,10 @@
 	}
 
 	/* create send_sms  sent_sms tables if they do not exist */
-	sql = octstr_format(CREATE TABLE IF NOT EXISTS %S (sql_id bigint(20) not null auto_increment primary key, momt enum('MO', 'MT', 'DLR') null, sender varchar(20) null, receiver varchar(20) null, udhdata varchar(255) null, msgdata varchar(255) null, time bigint(20) null, smsc_id varchar(255) null, service varchar(255) null, account varchar(255) null, id bigint(20) null, sms_type bigint(20) null, mclass bigint(20) null, mwi bigint(20) null, coding bigint(20) null, compress bigint(20) null, validity bigint(20) null, deferred bigint(20) null, dlr_mask bigint(20) null, dlr_url varchar(255) null, pid bigint(20) null, alt_dcs bigint(20) null, rpi bigint(20) null, charset varchar(255) null, boxc_id varchar(255) null, binfo varchar(255) null), sqlbox_logtable);
+	sql = octstr_format(CREATE TABLE %S (sql_id SERIAL PRIMARY KEY, momt VARCHAR(3) CHECK(momt IN ('MO', 'MT', 'DLR', NULL)) DEFAULT NULL, sender VARCHAR(20) NULL, receiver VARCHAR(20) NULL, udhdata VARCHAR(255) NULL, msgdata VARCHAR(255) NULL, time BIGINT NULL, smsc_id VARCHAR(255) NULL, service VARCHAR(255) NULL, account VARCHAR(255) NULL, id BIGINT NULL, sms_type BIGINT NULL, mclass BIGINT NULL, mwi BIGINT NULL, coding BIGINT NULL, compress BIGINT NULL, validity BIGINT NULL, deferred BIGINT NULL, dlr_mask BIGINT NULL, dlr_url VARCHAR(255) NULL, pid BIGINT NULL, alt_dcs BIGINT NULL, rpi BIGINT NULL, charset VARCHAR(255) NULL, boxc_id VARCHAR(255) NULL, binfo VARCHAR(255) NULL), sqlbox_logtable);
 	sql_update(sql);
 	octstr_destroy(sql);
-	sql = octstr_format(CREATE TABLE IF NOT EXISTS %S (sql_id bigint(20) not null auto_increment primary key, momt enum('MO', 'MT') null, sender varchar(20) null, receiver varchar(20) null, udhdata varchar(255) null, msgdata varchar(255) null, time bigint(20) null, smsc_id varchar(255) null, service varchar(255) null, account varchar(255) null, id bigint(20) null, sms_type bigint(20) null, mclass bigint(20) null, mwi bigint(20) null, coding bigint(20) null, compress bigint(20) null, validity bigint(20) null, deferred bigint(20) null, dlr_mask bigint(20) null, dlr_url varchar(255) null, pid bigint(20) null, alt_dcs bigint(20) null, rpi bigint(20) null, charset varchar(255) null, boxc_id varchar(255) null, binfo varchar(255) null), sqlbox_insert_table);
+	sql = octstr_format(CREATE TABLE %S (sql_id SERIAL PRIMARY KEY, momt VARCHAR(3) CHECK(momt IN ('MO', 'MT', NULL)) DEFAULT NULL, sender VARCHAR(20) NULL, receiver VARCHAR(20) NULL, udhdata VARCHAR(255) NULL, msgdata VARCHAR(255) NULL, time BIGINT NULL, smsc_id VARCHAR(255) NULL, service VARCHAR(255) NULL, account VARCHAR(255) NULL, id BIGINT NULL, sms_type BIGINT NULL, mclass BIGINT NULL, mwi BIGINT NULL, coding BIGINT NULL, compress BIGINT NULL, validity BIGINT NULL, deferred BIGINT NULL, dlr_mask BIGINT NULL, dlr_url VARCHAR(255) NULL, pid BIGINT NULL, alt_dcs BIGINT NULL, rpi BIGINT NULL, charset VARCHAR(255) NULL, boxc_id VARCHAR(255) NULL, binfo VARCHAR(255) NULL), sqlbox_insert_table);
 	sql_update(sql);
 	octstr_destroy(sql);
 	/* end table creation */
@@ -194,8 +194,8 @@
 	Octstr *stuffer[30];
 	int stuffcount = 0;
 
-	values = octstr_format(NULL, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, st_str(momt), st_str(msg-sms.sender), st_str(msg-sms.receiver), st_str(msg-sms.udhdata), st_str(msg-sms.msgdata), st_num(msg-sms.time), st_str(msg-sms.smsc_id), st_str(msg-sms.service), st_str(msg-sms.account), st_num(msg-sms.sms_type), st_num(msg-sms.mclass), st_num(msg-sms.mwi), st_num(msg-sms.coding), st_num(msg-sms.compress), st_num(msg-sms.validity), st_num(msg-sms.deferred), st_num(msg-sms.dlr_mask), st_str(msg-sms.dlr_url), st_num(msg-sms.pid), st_num(msg-sms.alt_dcs), st_num(msg-sms.rpi), st_str(msg-sms.charset), st_str(msg-sms.boxc_id), st_str(msg-sms.binfo));
-	sql = octstr_format(INSERT INTO %S (sql_id, momt, sender, receiver, udhdata, msgdata, time, smsc_id, service, account, sms_type, mclass, mwi, coding, compress, validity, deferred, dlr_mask, dlr_url, pid, alt_dcs, rpi, charset, boxc_id, binfo) VALUES (%S), sqlbox_logtable, values);
+	values = octstr_format(%S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, %S, st_str(momt), st_str(msg-sms.sender), st_str(msg-sms.receiver), st_str(msg-sms.udhdata), st_str(msg-sms.msgdata), st_num(msg-sms.time), st_str(msg-sms.smsc_id), st_str(msg-sms.service), st_str(msg-sms.account), st_num(msg-sms.sms_type), st_num(msg-sms.mclass), st_num(msg-sms.mwi), st_num(msg-sms.coding), st_num(msg-sms.compress