Changeset 482
- Timestamp:
- 07/07/08 10:34:29 (1 month ago)
- Files:
-
- trunk/tools/syncml-obex-client.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tools/syncml-obex-client.c
r476 r482 51 51 52 52 SmlBool onlyInfo = FALSE; 53 char *useTimeAnchor = NULL; 53 54 54 55 static void usage (char *name, int ecode) … … 80 81 fprintf (stderr, "[--useNumberOfChanges]\t\t\tSupport NumberOfChanges feature (the most new phones need it) (default: false)\n\n"); 81 82 fprintf (stderr, "[--useLargeObjs]\t\t\tSupport large objects feature (the most new phones need it) (default: false)\n\n"); 83 fprintf (stderr, "[--useTimeAnchor]\t\t\tUse timestamps as anchors (only for new Nokia series 40 phones)\n\n"); 82 84 fprintf (stderr, "[--dumpinfo]\t\t\tPrint info about the phone at the end which can be sent to the developers\n"); 83 85 exit (ecode); … … 202 204 smlTrace(TRACE_ENTRY, "%s(%p, %i, %s, %s, %p)", __func__, dsession, type, last, next, userdata); 203 205 SmlError *error = NULL; 206 const char *anchor = next; 207 if (useTimeAnchor) 208 anchor = useTimeAnchor; 204 209 205 210 printf("Received an Alert for the DS Server at %s: Type: %i, Last %s, Next %s\n", smlDsSessionGetLocation(dsession), type, last, next); … … 220 225 /* SLOW-SYNC enforced by tool */ 221 226 printf("Enforcing SLOW-SYNC\n"); 222 if (!smlDsSessionSendAlert(dsession, SML_ALERT_SLOW_SYNC, last, next, _recv_alert_reply, NULL, &error))227 if (!smlDsSessionSendAlert(dsession, SML_ALERT_SLOW_SYNC, NULL, anchor, _recv_alert_reply, NULL, &error)) 223 228 goto error; 224 229 … … 237 242 goto error; 238 243 } 239 if (!smlDsSessionSendAlert(dsession, type, last, next, _recv_alert_reply, NULL, &error))244 if (!smlDsSessionSendAlert(dsession, type, last, anchor, _recv_alert_reply, NULL, &error)) 240 245 goto error; 241 246 } … … 573 578 } else if (!strcmp (arg, "--useLargeObjs")) { 574 579 useLargeObjs = TRUE; 580 } else if (!strcmp (arg, "--useTimeAnchor")) { 581 useTimeAnchor = malloc(sizeof(char)*17); 582 time_t htime = time(NULL); 583 strftime(useTimeAnchor, 17, "%Y%m%dT%H%M%SZ", gmtime(&htime)); 575 584 } else if (!strcmp (arg, "--version")) { 576 585 i++;
