| 511 | } |
| 512 | |
| 513 | static int pv_get_formated_time(struct sip_msg *msg, pv_param_t *param, |
| 514 | pv_value_t *res) |
| 515 | { |
| 516 | static char buf[128]; |
| 517 | struct tm ltime; |
| 518 | time_t t; |
| 519 | |
| 520 | if(msg==NULL) |
| 521 | return -1; |
| 522 | |
| 523 | time( &t ); |
| 524 | localtime_r(&t, <ime); |
| 525 | res->rs.len = strftime( buf, 127, param->pvn.u.isname.name.s.s, <ime); |
| 526 | |
| 527 | if (res->rs.len<=0) |
| 528 | return pv_get_null(msg, param, res); |
| 529 | |
| 530 | res->rs.s = buf; |
| 531 | res->flags = PV_VAL_STR; |
| 532 | return 0; |
| 533 | } |
| 534 | |
| 535 | #define CTIME_BUFFER_NO 5 |
| 536 | #define CTIME_BUFFER_SIZE 26 |
nothing calls this directly
no test coverage detected