diff options
author | Uwe Steinmann <steinm@php.net> | 1999-10-21 15:15:27 +0000 |
---|---|---|
committer | Uwe Steinmann <steinm@php.net> | 1999-10-21 15:15:27 +0000 |
commit | 01400c0c1529e1529b60a0f158b13e1938ee426e (patch) | |
tree | 27a38939aa10e66d54d3072792e1a9dbe7f0a739 /ext/hyperwave/hw.c | |
parent | 4703eb404da486fab544f30800bd4dcadca5d0ea (diff) | |
download | php-git-01400c0c1529e1529b60a0f158b13e1938ee426e.tar.gz |
Added hw_mapid(), read comment in hg_comm.c
Diffstat (limited to 'ext/hyperwave/hw.c')
-rw-r--r-- | ext/hyperwave/hw.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index 31caae4a87..87925916c7 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -110,6 +110,7 @@ function_entry hw_functions[] = { PHP_FE(hw_getrellink, NULL) PHP_FE(hw_who, NULL) PHP_FE(hw_stat, NULL) + PHP_FE(hw_mapid, NULL) PHP_FE(hw_dummy, NULL) {NULL, NULL, NULL} }; @@ -3586,6 +3587,37 @@ PHP_FUNCTION(hw_getsrcbydestobj) { } /* }}} */ +/* {{{ proto int hw_mapid(int link, int serverid, int destid) + Returns virtual object id of document on remote hw server */ +PHP_FUNCTION(hw_mapid) { + pval *arg1, *arg2, *arg3; + int link, type, servid, id, virtid; + hw_connection *ptr; + + if (ARG_COUNT(ht) != 3 || getParameters(ht, 3, &arg1, &arg2, &arg3) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_long(arg1); + convert_to_long(arg2); + convert_to_long(arg3); + link=arg1->value.lval; + servid=arg2->value.lval; + id=arg3->value.lval; + ptr = php3_list_find(link,&type); + if(!ptr || (type!=HwSG(le_socketp) && type!=HwSG(le_psocketp))) { + php3_error(E_WARNING,"Unable to find file identifier %d",link); + RETURN_FALSE; + } + + set_swap(ptr->swap_on); + if (0 != (ptr->lasterror = send_mapid(ptr->socket, servid, id, &virtid))) { + php3_error(E_WARNING, "send_command (mapid) returned %d\n", ptr->lasterror); + RETURN_FALSE; + } + RETURN_LONG(virtid); +} +/* }}} */ + /* {{{ proto string hw_getrellink(int link, int rootid, int sourceid, int destid) Get link form source to dest relative to rootid */ PHP_FUNCTION(hw_getrellink) { |