Found in "gnokii-working" directory, some November-patches version
[gnokii.git] / smsd / smsd.c
index ba18ace..bd66ea3 100644 (file)
 
 #include "gsm-common.h"
 #include "gsm-api.h"
-#include "phones/nk7110.h"
-#include "phones/nk6100.h"
-#include "phones/nk3110.h"
-#include "phones/nk2110.h"
+#include "fbus-6110.h"
+#include "fbus-3810.h"
 #include "cfgreader.h"
 #include "smsd.h"
 #include "lowlevel.h"
@@ -171,15 +169,28 @@ gint WriteSMS (GSM_SMSMessage *sms)
   return (error);
 }
 
+GSM_Error WriteSMS_deconcatenated(GSM_SMSMessage *sms,char *buf,size_t buflen,bool useudh)
+{
+       GSM_Deconcatenate_state SMS_Deconcatenate_state;
+       GSM_Error error;
+
+       SMS_Deconcatenate_state.first=true;
+       while (SMS_Deconcatenate(&SMS_Deconcatenate_state,sms,buf,buflen,useudh)) {
+               /* Send the message. */
+               if (GE_SMSSENDOK != (error = WriteSMS(sms)))
+                       return(error);
+       }
+       return(GE_SMSSENDOK);
+}
 
 static void ReadSMS (gpointer d, gpointer userData)
 {
   GSM_SMSMessage *data = (GSM_SMSMessage *) d;
   PhoneEvent *e;
   
-  if (data->Type == SMS_Deliver || data->Type == SMS_Delivery_Report)
+  if (data->Type == GST_MT || data->Type == GST_DR)
   {
-    if (data->Type == SMS_Delivery_Report)
+    if (data->Type == GST_DR)
     {
 #ifdef XDEBUG
       g_print ("Report\n");