| | 274 | | | | upkstralloc(mp, ss) | | | 275 | | | | struct pmsg *mp; | | | 276 | | | | char **ss; | | | 277 | | | | { | | | 278 | | | | int cc; | | | 279 | | | | int l; | | | 280 | | | | | | | 281 | | | | if (!(cc = (mp->m_codef->dec_int) (mp, (void*)&l, 1, 1, sizeof(int)))) { | | | 282 | | | | if (l <= 0) | | | 283 | | | | cc = PvmNoData;
| | | 284 | | | | else { | | | 285 | | | | *ss = TALLOC(l, char, "ustr");
| | | 286 | | | | if ((cc = (mp->m_codef->dec_byte) (mp, (void*)*ss, l, 1, 1)) < 0) { | | | 287 | | | | PVM_FREE(*ss);
| | | 288 | | | | *ss = 0; | | | 289 | | | | } | | | 290 | | | | } | | | 291 | | | | } | | | 292 | | | | return cc; | | name <= 4095 | 293 | | | | } |
| | 2972 | | goto badformat; | | | 2973 | | | | | 2974 | | mp2 = mesg_new(0); | | | 2975 | | mp2->m_dst = mp->m_src; | | | 2976 | | mp2->m_tag = DM_DBACK;
| | | 2977 | | mp2->m_wid = mp->m_wid; | | | 2978 | | | | | 2979 | | switch (opcode) { | | | 2980 | | | | | 2981 | | case TMDB_PUT:
| | | 2982 | | mp3 = mesg_new(0); | | | 2983 | | if (pmsg_unpack(mp, mp3)) | | | 2984 | | goto badformat; | | | 2985 | | if ((req = mb_insert(tid, name, req, flags, mp3)) < 0) | | | 2986 | | pmsg_unref(mp3); | | | 2987 | | else { | | | 2988 | | | | | 2989 | | | | | | | ... | | | 3070 | | pmsg_unref(mp3); | | | 3071 | | } | | | 3072 | | } | | | 3073 | | break; | | | 3074 | | | | | 3075 | | case TMDB_NAMES:
| | | 3076 | | pkint(mp2, 0); | | | 3077 | | req = mb_names(tid, name, mp2); | | | 3078 | | break; | | | 3079 | | | | | 3080 | | case TMDB_RESET:
| | | 3081 | | if ( upkint(mp, &nnr) ) | | | 3082 | | goto badformat; | | | 3083 | | noresets = TALLOC( nnr, int, "int" );
| | | 3084 | | for ( i=0 ; i < nnr ; i++ ) { | | | 3085 | | if ( upkint(mp, &(noresets[i])) ) { | | | 3086 | | PVM_FREE(noresets);
| | | 3087 | | goto badformat; | | | 3088 | | } | | | 3089 | | } | | | 3090 | | pkint(mp2, 0); | | | 3091 | | for (np = pvmmboxclasses->mc_link; np != pvmmboxclasses; | | | 3092 | | np = np2) { | | | 3093 | | np2 = np->mc_link; | | | 3094 | | | | | 3095 | | | | | 3096 | | if ( *name == '\0' || !strcmp( np->mc_name, name ) ) { | | | 3097 | | | | | 3098 | | for (ep = np->mc_ent->me_link; ep != np->mc_ent; ep = ep2) { | | | 3099 | | ep2 = ep->me_link; | | | 3100 | | | | | 3101 | | | | | | | ... | | | 3139 | | mp4->m_wid = wp->wa_wid; | | | 3140 | | sendmessage(mp4); | | | 3141 | | } | | | 3142 | | } | | | 3143 | | } | | | 3144 | | } | | | 3145 | | } | | | 3146 | | } | | | 3147 | | } | | | 3148 | | } | | | 3149 | | PVM_FREE(noresets);
| | | 3150 | | break; | | | 3151 | | | | | 3152 | | default: | | | 3153 | | goto badformat; | | | 3154 | | } | | | 3155 | | | | | 3156 | | sendmessage(mp2); | | name <= 4095 | 3157 | | PVM_FREE(name);
|
|