a standard method to retrieve status text from a SMSC interface

"fred" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <033101c51af0$4d16a4d0$0401a8c0@FRED4>
as it is nice to have some customised status information returned from the interface i am suggesting another pointer function

thus the string returned by the function is appended to the normal status result.
if the fn pointer is NULL, then it is not called, so an smsc i/f doesn't need not to have it

so can this (or a variation of this) get submitted ?
is this method ok? or is there a better idea?

Cheers
thanks



--- smscconn_p.h        11 Feb 2005 15:35:48 -0000      1.48
+++ smscconn_p.h        25 Feb 2005 04:03:41 -0000
@@ -231,6 +231,7 @@
 
     void (*start_conn) (SMSCConn *conn);
     void (*stop_conn) (SMSCConn *conn);
+    Octstr * (*smsc_statustext)(SMSCConn *conn,int rno);



ndex: bb_smscconn.c
===================================================================
RCS file: /home/cvs/gateway/gw/bb_smscconn.c,v
retrieving revision 1.82
diff -u -r1.82 bb_smscconn.c
--- bb_smscconn.c       11 Feb 2005 15:35:48 -0000      1.82
+++ bb_smscconn.c       25 Feb 2005 04:04:51 -0000
@@ -845,6 +845,14 @@
                 "queued %ld msgs)%s", tmp3,
             info.received, info.sent, info.failed,
             info.queued, lb);
+
+       if(conn->smsc_statustext !=NULL)
+       {
+               Octstr *s = conn->smsc_statustext(conn,status_type);
+               octstr_append(tmp,s);
+               octstr_destroy(s);
+       }
+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.