xdr.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. /* @(#)xdr.c 2.1 88/07/29 4.0 RPCSRC */
  2. /*
  3. * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  4. * unrestricted use provided that this legend is included on all tape
  5. * media and as a part of the software program in whole or part. Users
  6. * may copy or modify Sun RPC without charge, but are not authorized
  7. * to license or distribute it to anyone else except as part of a product or
  8. * program developed by the user.
  9. *
  10. * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  11. * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  12. * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
  13. *
  14. * Sun RPC is provided with no support and without any obligation on the
  15. * part of Sun Microsystems, Inc. to assist in its use, correction,
  16. * modification or enhancement.
  17. *
  18. * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  19. * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  20. * OR ANY PART THEREOF.
  21. *
  22. * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  23. * or profits or other special, indirect and consequential damages, even if
  24. * Sun has been advised of the possibility of such damages.
  25. *
  26. * Sun Microsystems, Inc.
  27. * 2550 Garcia Avenue
  28. * Mountain View, California 94043
  29. */
  30. #if 0
  31. static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";
  32. #endif
  33. /*
  34. * xdr.c, Generic XDR routines implementation.
  35. *
  36. * Copyright (C) 1986, Sun Microsystems, Inc.
  37. *
  38. * These are the "generic" xdr routines used to serialize and de-serialize
  39. * most common data items. See xdr.h for more info on the interface to
  40. * xdr.
  41. */
  42. #define __FORCE_GLIBC
  43. #include <features.h>
  44. #include <stdio.h>
  45. #include <limits.h>
  46. #include <string.h>
  47. #include <rpc/types.h>
  48. #include <rpc/xdr.h>
  49. #ifdef USE_IN_LIBIO
  50. # include <wchar.h>
  51. libc_hidden_proto(fwprintf)
  52. #endif
  53. /* Experimentally off - libc_hidden_proto(strlen) */
  54. libc_hidden_proto(fputs)
  55. /*
  56. * constants specific to the xdr "protocol"
  57. */
  58. #define XDR_FALSE ((long) 0)
  59. #define XDR_TRUE ((long) 1)
  60. #define LASTUNSIGNED ((u_int) 0-1)
  61. /*
  62. * for unit alignment
  63. */
  64. static const char xdr_zero[BYTES_PER_XDR_UNIT] = {0, 0, 0, 0};
  65. /*
  66. * Free a data structure using XDR
  67. * Not a filter, but a convenient utility nonetheless
  68. */
  69. void
  70. xdr_free (xdrproc_t proc, char *objp)
  71. {
  72. XDR x;
  73. x.x_op = XDR_FREE;
  74. (*proc) (&x, objp);
  75. }
  76. /*
  77. * XDR nothing
  78. */
  79. libc_hidden_proto(xdr_void)
  80. bool_t
  81. xdr_void (void)
  82. {
  83. return TRUE;
  84. }
  85. libc_hidden_def(xdr_void)
  86. /*
  87. * XDR long integers
  88. * The definition of xdr_long() is kept for backward
  89. * compatibility. Instead xdr_int() should be used.
  90. */
  91. libc_hidden_proto(xdr_long)
  92. bool_t
  93. xdr_long (XDR *xdrs, long *lp)
  94. {
  95. if (xdrs->x_op == XDR_ENCODE
  96. && (sizeof (int32_t) == sizeof (long)
  97. || (int32_t) *lp == *lp))
  98. return XDR_PUTLONG (xdrs, lp);
  99. if (xdrs->x_op == XDR_DECODE)
  100. return XDR_GETLONG (xdrs, lp);
  101. if (xdrs->x_op == XDR_FREE)
  102. return TRUE;
  103. return FALSE;
  104. }
  105. libc_hidden_def(xdr_long)
  106. /*
  107. * XDR short integers
  108. */
  109. libc_hidden_proto(xdr_short)
  110. bool_t
  111. xdr_short (XDR *xdrs, short *sp)
  112. {
  113. long l;
  114. switch (xdrs->x_op)
  115. {
  116. case XDR_ENCODE:
  117. l = (long) *sp;
  118. return XDR_PUTLONG (xdrs, &l);
  119. case XDR_DECODE:
  120. if (!XDR_GETLONG (xdrs, &l))
  121. {
  122. return FALSE;
  123. }
  124. *sp = (short) l;
  125. return TRUE;
  126. case XDR_FREE:
  127. return TRUE;
  128. }
  129. return FALSE;
  130. }
  131. libc_hidden_def(xdr_short)
  132. /*
  133. * XDR integers
  134. */
  135. libc_hidden_proto(xdr_int)
  136. bool_t
  137. xdr_int (XDR *xdrs, int *ip)
  138. {
  139. #if INT_MAX < LONG_MAX
  140. long l;
  141. switch (xdrs->x_op)
  142. {
  143. case XDR_ENCODE:
  144. l = (long) *ip;
  145. return XDR_PUTLONG (xdrs, &l);
  146. case XDR_DECODE:
  147. if (!XDR_GETLONG (xdrs, &l))
  148. {
  149. return FALSE;
  150. }
  151. *ip = (int) l;
  152. case XDR_FREE:
  153. return TRUE;
  154. }
  155. return FALSE;
  156. #elif INT_MAX == LONG_MAX
  157. return xdr_long (xdrs, (long *) ip);
  158. #elif INT_MAX == SHRT_MAX
  159. return xdr_short (xdrs, (short *) ip);
  160. #else
  161. #error unexpected integer sizes in xdr_int()
  162. #endif
  163. }
  164. libc_hidden_def(xdr_int)
  165. /*
  166. * XDR unsigned long integers
  167. * The definition of xdr_u_long() is kept for backward
  168. * compatibility. Instead xdr_u_int() should be used.
  169. */
  170. libc_hidden_proto(xdr_u_long)
  171. bool_t
  172. xdr_u_long (XDR *xdrs, u_long *ulp)
  173. {
  174. switch (xdrs->x_op)
  175. {
  176. case XDR_DECODE:
  177. {
  178. long int tmp;
  179. if (XDR_GETLONG (xdrs, &tmp) == FALSE)
  180. return FALSE;
  181. *ulp = (uint32_t) tmp;
  182. return TRUE;
  183. }
  184. case XDR_ENCODE:
  185. if (sizeof (uint32_t) != sizeof (u_long)
  186. && (uint32_t) *ulp != *ulp)
  187. return FALSE;
  188. return XDR_PUTLONG (xdrs, (long *) ulp);
  189. case XDR_FREE:
  190. return TRUE;
  191. }
  192. return FALSE;
  193. }
  194. libc_hidden_def(xdr_u_long)
  195. /*
  196. * XDR unsigned integers
  197. */
  198. libc_hidden_proto(xdr_u_int)
  199. bool_t
  200. xdr_u_int (XDR *xdrs, u_int *up)
  201. {
  202. #if UINT_MAX < ULONG_MAX
  203. u_long l;
  204. switch (xdrs->x_op)
  205. {
  206. case XDR_ENCODE:
  207. l = (u_long) * up;
  208. return XDR_PUTLONG (xdrs, &l);
  209. case XDR_DECODE:
  210. if (!XDR_GETLONG (xdrs, &l))
  211. {
  212. return FALSE;
  213. }
  214. *up = (u_int) l;
  215. case XDR_FREE:
  216. return TRUE;
  217. }
  218. return FALSE;
  219. #elif UINT_MAX == ULONG_MAX
  220. return xdr_u_long (xdrs, (u_long *) up);
  221. #elif UINT_MAX == USHRT_MAX
  222. return xdr_short (xdrs, (short *) up);
  223. #else
  224. #error unexpected integer sizes in xdr_u_int()
  225. #endif
  226. }
  227. libc_hidden_def(xdr_u_int)
  228. /*
  229. * XDR hyper integers
  230. * same as xdr_u_hyper - open coded to save a proc call!
  231. */
  232. libc_hidden_proto(xdr_hyper)
  233. bool_t
  234. xdr_hyper (XDR *xdrs, quad_t *llp)
  235. {
  236. long t1;
  237. unsigned long int t2;
  238. if (xdrs->x_op == XDR_ENCODE)
  239. {
  240. t1 = (long) ((*llp) >> 32);
  241. t2 = (long) (*llp);
  242. return (XDR_PUTLONG(xdrs, &t1) && XDR_PUTLONG(xdrs, &t2));
  243. }
  244. if (xdrs->x_op == XDR_DECODE)
  245. {
  246. if (!XDR_GETLONG(xdrs, &t1) || !XDR_GETLONG(xdrs, &t2))
  247. return FALSE;
  248. *llp = ((quad_t) t1) << 32;
  249. *llp |= t2;
  250. return TRUE;
  251. }
  252. if (xdrs->x_op == XDR_FREE)
  253. return TRUE;
  254. return FALSE;
  255. }
  256. libc_hidden_def(xdr_hyper)
  257. /*
  258. * XDR hyper integers
  259. * same as xdr_hyper - open coded to save a proc call!
  260. */
  261. libc_hidden_proto(xdr_u_hyper)
  262. bool_t
  263. xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
  264. {
  265. unsigned long t1;
  266. unsigned long t2;
  267. if (xdrs->x_op == XDR_ENCODE)
  268. {
  269. t1 = (unsigned long) ((*ullp) >> 32);
  270. t2 = (unsigned long) (*ullp);
  271. return (XDR_PUTLONG(xdrs, &t1) && XDR_PUTLONG(xdrs, &t2));
  272. }
  273. if (xdrs->x_op == XDR_DECODE)
  274. {
  275. if (!XDR_GETLONG(xdrs, &t1) || !XDR_GETLONG(xdrs, &t2))
  276. return FALSE;
  277. *ullp = ((u_quad_t) t1) << 32;
  278. *ullp |= t2;
  279. return TRUE;
  280. }
  281. if (xdrs->x_op == XDR_FREE)
  282. return TRUE;
  283. return FALSE;
  284. }
  285. libc_hidden_def(xdr_u_hyper)
  286. bool_t
  287. xdr_longlong_t (XDR *xdrs, quad_t *llp)
  288. {
  289. return xdr_hyper (xdrs, llp);
  290. }
  291. bool_t
  292. xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp)
  293. {
  294. return xdr_u_hyper (xdrs, ullp);
  295. }
  296. /*
  297. * XDR unsigned short integers
  298. */
  299. libc_hidden_proto(xdr_u_short)
  300. bool_t
  301. xdr_u_short (XDR *xdrs, u_short *usp)
  302. {
  303. u_long l;
  304. switch (xdrs->x_op)
  305. {
  306. case XDR_ENCODE:
  307. l = (u_long) * usp;
  308. return XDR_PUTLONG (xdrs, &l);
  309. case XDR_DECODE:
  310. if (!XDR_GETLONG (xdrs, &l))
  311. {
  312. return FALSE;
  313. }
  314. *usp = (u_short) l;
  315. return TRUE;
  316. case XDR_FREE:
  317. return TRUE;
  318. }
  319. return FALSE;
  320. }
  321. libc_hidden_def(xdr_u_short)
  322. /*
  323. * XDR a char
  324. */
  325. bool_t
  326. xdr_char (XDR *xdrs, char *cp)
  327. {
  328. int i;
  329. i = (*cp);
  330. if (!xdr_int (xdrs, &i))
  331. {
  332. return FALSE;
  333. }
  334. *cp = i;
  335. return TRUE;
  336. }
  337. /*
  338. * XDR an unsigned char
  339. */
  340. bool_t
  341. xdr_u_char (XDR *xdrs, u_char *cp)
  342. {
  343. u_int u;
  344. u = (*cp);
  345. if (!xdr_u_int (xdrs, &u))
  346. {
  347. return FALSE;
  348. }
  349. *cp = u;
  350. return TRUE;
  351. }
  352. /*
  353. * XDR booleans
  354. */
  355. libc_hidden_proto(xdr_bool)
  356. bool_t
  357. xdr_bool (XDR *xdrs, bool_t *bp)
  358. {
  359. long lb;
  360. switch (xdrs->x_op)
  361. {
  362. case XDR_ENCODE:
  363. lb = *bp ? XDR_TRUE : XDR_FALSE;
  364. return XDR_PUTLONG (xdrs, &lb);
  365. case XDR_DECODE:
  366. if (!XDR_GETLONG (xdrs, &lb))
  367. {
  368. return FALSE;
  369. }
  370. *bp = (lb == XDR_FALSE) ? FALSE : TRUE;
  371. return TRUE;
  372. case XDR_FREE:
  373. return TRUE;
  374. }
  375. return FALSE;
  376. }
  377. libc_hidden_def(xdr_bool)
  378. /*
  379. * XDR enumerations
  380. */
  381. libc_hidden_proto(xdr_enum)
  382. bool_t
  383. xdr_enum (XDR *xdrs, enum_t *ep)
  384. {
  385. enum sizecheck
  386. {
  387. SIZEVAL
  388. }; /* used to find the size of an enum */
  389. /*
  390. * enums are treated as ints
  391. */
  392. if (sizeof (enum sizecheck) == 4)
  393. {
  394. #if INT_MAX < LONG_MAX
  395. long l;
  396. switch (xdrs->x_op)
  397. {
  398. case XDR_ENCODE:
  399. l = *ep;
  400. return XDR_PUTLONG (xdrs, &l);
  401. case XDR_DECODE:
  402. if (!XDR_GETLONG (xdrs, &l))
  403. {
  404. return FALSE;
  405. }
  406. *ep = l;
  407. case XDR_FREE:
  408. return TRUE;
  409. }
  410. return FALSE;
  411. #else
  412. return xdr_long (xdrs, (long *) ep);
  413. #endif
  414. }
  415. else if (sizeof (enum sizecheck) == sizeof (short))
  416. {
  417. return xdr_short (xdrs, (short *) ep);
  418. }
  419. else
  420. {
  421. return FALSE;
  422. }
  423. }
  424. libc_hidden_def(xdr_enum)
  425. /*
  426. * XDR opaque data
  427. * Allows the specification of a fixed size sequence of opaque bytes.
  428. * cp points to the opaque object and cnt gives the byte length.
  429. */
  430. libc_hidden_proto(xdr_opaque)
  431. bool_t
  432. xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
  433. {
  434. u_int rndup;
  435. static char crud[BYTES_PER_XDR_UNIT];
  436. /*
  437. * if no data we are done
  438. */
  439. if (cnt == 0)
  440. return TRUE;
  441. /*
  442. * round byte count to full xdr units
  443. */
  444. rndup = cnt % BYTES_PER_XDR_UNIT;
  445. if (rndup > 0)
  446. rndup = BYTES_PER_XDR_UNIT - rndup;
  447. switch (xdrs->x_op)
  448. {
  449. case XDR_DECODE:
  450. if (!XDR_GETBYTES (xdrs, cp, cnt))
  451. {
  452. return FALSE;
  453. }
  454. if (rndup == 0)
  455. return TRUE;
  456. return XDR_GETBYTES (xdrs, (caddr_t)crud, rndup);
  457. case XDR_ENCODE:
  458. if (!XDR_PUTBYTES (xdrs, cp, cnt))
  459. {
  460. return FALSE;
  461. }
  462. if (rndup == 0)
  463. return TRUE;
  464. return XDR_PUTBYTES (xdrs, xdr_zero, rndup);
  465. case XDR_FREE:
  466. return TRUE;
  467. }
  468. return FALSE;
  469. }
  470. libc_hidden_def(xdr_opaque)
  471. /*
  472. * XDR counted bytes
  473. * *cpp is a pointer to the bytes, *sizep is the count.
  474. * If *cpp is NULL maxsize bytes are allocated
  475. */
  476. libc_hidden_proto(xdr_bytes)
  477. bool_t
  478. xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize)
  479. {
  480. char *sp = *cpp; /* sp is the actual string pointer */
  481. u_int nodesize;
  482. /*
  483. * first deal with the length since xdr bytes are counted
  484. */
  485. if (!xdr_u_int (xdrs, sizep))
  486. {
  487. return FALSE;
  488. }
  489. nodesize = *sizep;
  490. if ((nodesize > maxsize) && (xdrs->x_op != XDR_FREE))
  491. {
  492. return FALSE;
  493. }
  494. /*
  495. * now deal with the actual bytes
  496. */
  497. switch (xdrs->x_op)
  498. {
  499. case XDR_DECODE:
  500. if (nodesize == 0)
  501. {
  502. return TRUE;
  503. }
  504. if (sp == NULL)
  505. {
  506. *cpp = sp = (char *) mem_alloc (nodesize);
  507. }
  508. if (sp == NULL)
  509. {
  510. #ifdef USE_IN_LIBIO
  511. if (_IO_fwide (stderr, 0) > 0)
  512. (void) fwprintf (stderr, L"%s", _("xdr_bytes: out of memory\n"));
  513. else
  514. #endif
  515. (void) fputs (_("xdr_bytes: out of memory\n"), stderr);
  516. return FALSE;
  517. }
  518. /* fall into ... */
  519. case XDR_ENCODE:
  520. return xdr_opaque (xdrs, sp, nodesize);
  521. case XDR_FREE:
  522. if (sp != NULL)
  523. {
  524. mem_free (sp, nodesize);
  525. *cpp = NULL;
  526. }
  527. return TRUE;
  528. }
  529. return FALSE;
  530. }
  531. libc_hidden_def(xdr_bytes)
  532. /*
  533. * Implemented here due to commonality of the object.
  534. */
  535. bool_t
  536. xdr_netobj (xdrs, np)
  537. XDR *xdrs;
  538. struct netobj *np;
  539. {
  540. return xdr_bytes (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ);
  541. }
  542. /*
  543. * XDR a discriminated union
  544. * Support routine for discriminated unions.
  545. * You create an array of xdrdiscrim structures, terminated with
  546. * an entry with a null procedure pointer. The routine gets
  547. * the discriminant value and then searches the array of xdrdiscrims
  548. * looking for that value. It calls the procedure given in the xdrdiscrim
  549. * to handle the discriminant. If there is no specific routine a default
  550. * routine may be called.
  551. * If there is no specific or default routine an error is returned.
  552. */
  553. libc_hidden_proto(xdr_union)
  554. bool_t
  555. xdr_union (XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choices, xdrproc_t dfault)
  556. {
  557. enum_t dscm;
  558. /*
  559. * we deal with the discriminator; it's an enum
  560. */
  561. if (!xdr_enum (xdrs, dscmp))
  562. {
  563. return FALSE;
  564. }
  565. dscm = *dscmp;
  566. /*
  567. * search choices for a value that matches the discriminator.
  568. * if we find one, execute the xdr routine for that value.
  569. */
  570. for (; choices->proc != NULL_xdrproc_t; choices++)
  571. {
  572. if (choices->value == dscm)
  573. return (*(choices->proc)) (xdrs, unp, LASTUNSIGNED);
  574. }
  575. /*
  576. * no match - execute the default xdr routine if there is one
  577. */
  578. return ((dfault == NULL_xdrproc_t) ? FALSE :
  579. (*dfault) (xdrs, unp, LASTUNSIGNED));
  580. }
  581. libc_hidden_def(xdr_union)
  582. /*
  583. * Non-portable xdr primitives.
  584. * Care should be taken when moving these routines to new architectures.
  585. */
  586. /*
  587. * XDR null terminated ASCII strings
  588. * xdr_string deals with "C strings" - arrays of bytes that are
  589. * terminated by a NULL character. The parameter cpp references a
  590. * pointer to storage; If the pointer is null, then the necessary
  591. * storage is allocated. The last parameter is the max allowed length
  592. * of the string as specified by a protocol.
  593. */
  594. libc_hidden_proto(xdr_string)
  595. bool_t
  596. xdr_string (XDR *xdrs, char **cpp, u_int maxsize)
  597. {
  598. char *sp = *cpp; /* sp is the actual string pointer */
  599. u_int size;
  600. u_int nodesize;
  601. /*
  602. * first deal with the length since xdr strings are counted-strings
  603. */
  604. switch (xdrs->x_op)
  605. {
  606. case XDR_FREE:
  607. if (sp == NULL)
  608. {
  609. return TRUE; /* already free */
  610. }
  611. /* fall through... */
  612. case XDR_ENCODE:
  613. if (sp == NULL)
  614. return FALSE;
  615. size = strlen (sp);
  616. break;
  617. case XDR_DECODE:
  618. break;
  619. }
  620. if (!xdr_u_int (xdrs, &size))
  621. {
  622. return FALSE;
  623. }
  624. if (size > maxsize)
  625. {
  626. return FALSE;
  627. }
  628. nodesize = size + 1;
  629. /*
  630. * now deal with the actual bytes
  631. */
  632. switch (xdrs->x_op)
  633. {
  634. case XDR_DECODE:
  635. if (nodesize == 0)
  636. {
  637. return TRUE;
  638. }
  639. if (sp == NULL)
  640. *cpp = sp = (char *) mem_alloc (nodesize);
  641. if (sp == NULL)
  642. {
  643. #ifdef USE_IN_LIBIO
  644. if (_IO_fwide (stderr, 0) > 0)
  645. (void) fwprintf (stderr, L"%s",
  646. _("xdr_string: out of memory\n"));
  647. else
  648. #endif
  649. (void) fputs (_("xdr_string: out of memory\n"), stderr);
  650. return FALSE;
  651. }
  652. sp[size] = 0;
  653. /* fall into ... */
  654. case XDR_ENCODE:
  655. return xdr_opaque (xdrs, sp, size);
  656. case XDR_FREE:
  657. mem_free (sp, nodesize);
  658. *cpp = NULL;
  659. return TRUE;
  660. }
  661. return FALSE;
  662. }
  663. libc_hidden_def(xdr_string)
  664. /*
  665. * Wrapper for xdr_string that can be called directly from
  666. * routines like clnt_call
  667. */
  668. bool_t
  669. xdr_wrapstring (xdrs, cpp)
  670. XDR *xdrs;
  671. char **cpp;
  672. {
  673. if (xdr_string (xdrs, cpp, LASTUNSIGNED))
  674. {
  675. return TRUE;
  676. }
  677. return FALSE;
  678. }