? extras/Makefile.in
? extras/mmsbox-mm1/Makefile.in
? extras/pgsql-queue/Makefile.in
Index: doc/userguide.shtml
===================================================================
RCS file: /cvsroot/mbuni/mbuni/doc/userguide.shtml,v
retrieving revision 1.93
diff -r1.93 userguide.shtml
3260c3260,3275
< 1
---
> 
>  <tr>
>   <td  valign=top >
>   <tt>retry-statuses
>   </tt>
>   &nbsp; &nbsp;</td>
> 
>   <td valign=top >
>   String
>   </td>
> 
>   <td  valign=top >
>   Optional. Semicolon separated list of HTTP and MM7 statuses that makes MBUNI to retry sending to MMSC. 
>   MM7 statuses are checked only when HTTP 200 is received from MMSC (HTTP 200 is always assumed as retry status).</td>
>  </tr>
> 
Index: extras/pgsql-queue/mms_pgsql_queue.c
===================================================================
RCS file: /cvsroot/mbuni/mbuni/extras/pgsql-queue/mms_pgsql_queue.c,v
retrieving revision 1.43
diff -r1.43 mms_pgsql_queue.c
69c69
< 	  Octstr *x = octstr_copy(xcinfo, 0, i);
---
> 	  Octstr *x = octstr_copy(xcinfo, i, octstr_len(xcinfo));
71c71
< 	  octstr_delete(xcinfo, 0, i+1);
---
> 	  octstr_delete(xcinfo, i, octstr_len(xcinfo));
Index: mmlib/mms_cfg.def
===================================================================
RCS file: /cvsroot/mbuni/mbuni/mmlib/mms_cfg.def,v
retrieving revision 1.46
diff -r1.46 mms_cfg.def
200a201
> 	OCTSTR(retry-statuses)
Index: mmlib/mms_mm7soap.c
===================================================================
RCS file: /cvsroot/mbuni/mbuni/mmlib/mms_mm7soap.c,v
retrieving revision 1.69
diff -r1.69 mms_mm7soap.c
709c709
< 	  http_header_add(hx, "Content-Type", "text/xml");
---
> 	  http_header_add(hx, "Content-Type", "text/xml; charset=utf-8");
Index: mmlib/mms_util.c
===================================================================
RCS file: /cvsroot/mbuni/mbuni/mmlib/mms_util.c,v
retrieving revision 1.130
diff -r1.130 mms_util.c
3039c3039
< 	  xmlDocDumpFormatMemory(smil, &buf, &bsize, 1);
---
> 	  xmlDocDumpFormatMemoryEnc(smil, &buf, &bsize, "utf-8", 1);
3046c3046
< 	       http_header_add(xh, "Content-Type", "application/smil");
---
> 	       http_header_add(xh, "Content-Type", "application/smil; charset=utf-8");
Index: mmsbox/bearerbox.c
===================================================================
RCS file: /cvsroot/mbuni/mbuni/mmsbox/bearerbox.c,v
retrieving revision 1.105
diff -r1.105 bearerbox.c
1114a1115,1138
> /* This function check if there is custom retry statuses list setup for mmc, 
>  * if not it returns -1, 
>  * if it is set check if current status should be retried (returns 1) or not (returns 0)
>  */
> 
> int check_custom_retry_statuses(MmscGrp *mmc, int hstatus) {
>     int retry_sending = -1, i, n;
>     Octstr *res_str = octstr_format("%d", hstatus);
>     if (mmc && mmc->retry_statuses != NULL) {
>         retry_sending = 0;
>         for (i = 0, n = gwlist_len(mmc->retry_statuses); i<n; i++) {
>     	    Octstr *retry_status = gwlist_get(mmc->retry_statuses, i);
>     	    if (octstr_compare(res_str, retry_status) == 0) {
>     		retry_sending = 1;
>     		break;
>     	    }
> 	}
>     }
>     octstr_destroy(res_str);
>     
>     return retry_sending;
> }
> 
> 
1139a1164
>      int retry_sending = -1;
1175a1201,1204
> 	
> 	  /* Now check if we should retry */
> 	  retry_sending = check_custom_retry_statuses(mmc, hstatus);
> 	
1229a1259,1261
>      /* Now check if we should retry */
>      retry_sending = check_custom_retry_statuses(mmc, tstatus);
>      
1266c1298,1301
<      *retry = (ret == NULL && (!MM7_SOAP_CLIENT_ERROR(tstatus) || tstatus < 0));
---
>      //DEFAULT when retry_sending < 0
>      //otherwise we rely on retry_status list
>      if (retry_sending < 0) *retry = (ret == NULL && (!MM7_SOAP_CLIENT_ERROR(tstatus) || tstatus < 0));
>      else *retry = retry_sending;
1297a1333
>      int retry_sending = -1;
1353a1390,1393
> 	
> 	  /* Now check if we should retry */
> 	  retry_sending = check_custom_retry_statuses(mmc, hstatus);
> 	
1380c1420,1424
<      *retry = (ret == NULL && (hstatus == HTTP_STATUS_SERVER_ERROR || hstatus < 0));
---
>      
>      //DEFAULT when retry_sending < 0
>      //otherwise we rely on retry_status list
>      if (retry_sending < 0) *retry = (ret == NULL && (hstatus == HTTP_STATUS_SERVER_ERROR || hstatus < 0));
>      else *retry = retry_sending;
1425a1470
>      int retry_sending = -1;
1455a1501,1504
> 	
> 	  /* Now check if we should retry */
> 	  retry_sending = check_custom_retry_statuses(mmc, hstatus);
> 	
1470c1519,1522
<      *retry = (ret == NULL && (http_status_class(hstatus) == HTTP_STATUS_SERVER_ERROR || hstatus < 0));
---
>      //DEFAULT when retry_sending < 0
>      //otherwise we rely on retry_status list
>      if (retry_sending < 0) *retry = (ret == NULL && (http_status_class(hstatus) == HTTP_STATUS_SERVER_ERROR || hstatus < 0));
>      else *retry = retry_sending;
Index: mmsbox/mmsbox_cfg.c
===================================================================
RCS file: /cvsroot/mbuni/mbuni/mmsbox/mmsbox_cfg.c,v
retrieving revision 1.91
diff -r1.91 mmsbox_cfg.c
637a638,645
> 	  
>      if ((s = mms_cfg_get(cfg, x, octstr_imm("retry-statuses"))) != NULL) {
> 	  m->retry_statuses = octstr_split(s, octstr_imm(";"));
> 	  octstr_destroy(s);
>      } else 
> 	  m->retry_statuses = NULL;
> 
> 
1301a1310
>      gwlist_destroy(m->retry_statuses, (void *)octstr_destroy);
Index: mmsbox/mmsbox_cfg.h
===================================================================
RCS file: /cvsroot/mbuni/mbuni/mmsbox/mmsbox_cfg.h,v
retrieving revision 1.47
diff -r1.47 mmsbox_cfg.h
91a92,93
>      List *retry_statuses; /* List of HTTP/MM7 statuses we do retry on, MM7 statuses are checked only on HTTP 200 - they do not overlap*/
> 
