| 1502 | } |
| 1503 | |
| 1504 | static inline int get_timestamp(int *sec,int *usec) |
| 1505 | { |
| 1506 | struct timeval t; |
| 1507 | |
| 1508 | if (gettimeofday(&t,NULL) != 0) |
| 1509 | { |
| 1510 | LM_ERR("failed to get time of day\n"); |
| 1511 | return -1; |
| 1512 | } |
| 1513 | |
| 1514 | *sec = t.tv_sec; |
| 1515 | *usec = t.tv_usec; |
| 1516 | |
| 1517 | return 0; |
| 1518 | } |
| 1519 | |
| 1520 | /* |
| 1521 | * checks if the string is a token as defined in rfc3261 |