diff options
author | Jeremy Allison <jra@samba.org> | 2009-10-17 10:36:33 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-10-17 10:36:33 -0700 |
commit | 7c51fa6d699a653cafa90df8e44911b576118ebd (patch) | |
tree | 543bf9ca698e03eff81104898b33e77f1abed319 /source3/rpc_parse/parse_prs.c | |
parent | cc3a6770c77ec8fe1cd63bf4c682853c56201f0c (diff) | |
parent | 3e3214fd91471bca5b6c4d3782e922d252d588fb (diff) | |
download | samba-7c51fa6d699a653cafa90df8e44911b576118ebd.tar.gz samba-7c51fa6d699a653cafa90df8e44911b576118ebd.tar.bz2 samba-7c51fa6d699a653cafa90df8e44911b576118ebd.zip |
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
Diffstat (limited to 'source3/rpc_parse/parse_prs.c')
-rw-r--r-- | source3/rpc_parse/parse_prs.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index edccded6c6..aade037f89 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -1021,50 +1021,6 @@ bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str) return True; } - -/******************************************************************* - Stream a null-terminated string. len is strlen, and therefore does - not include the null-termination character. - ********************************************************************/ - -bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_buf_size) -{ - char *q; - int i; - int len; - - if (UNMARSHALLING(ps)) - len = strlen(&ps->data_p[ps->data_offset]); - else - len = strlen(str); - - len = MIN(len, (max_buf_size-1)); - - q = prs_mem_get(ps, len+1); - if (q == NULL) - return False; - - for(i = 0; i < len; i++) { - if (UNMARSHALLING(ps)) - str[i] = q[i]; - else - q[i] = str[i]; - } - - /* The terminating null. */ - str[i] = '\0'; - - if (MARSHALLING(ps)) { - q[i] = '\0'; - } - - ps->data_offset += len+1; - - dump_data(5+depth, (uint8 *)q, len); - - return True; -} - /******************************************************************* creates a new prs_struct containing a DATA_BLOB ********************************************************************/ |